﻿<?xml version="1.0" encoding="utf-8" ?>

<Rules FriendlyName="Bovespa Maintainability Rules">

  <Rule TypeName="BovespaClassFieldsMustHaveInLineComments" Category="BovespaClassFieldsMustHaveInLineComments" CheckId="BOV2502">
    <Name>Check BovespaClassFieldsMustHaveInLineComments</Name>
    <Description>Check BovespaClassFieldsMustHaveInLineComments</Description>
    <Url></Url>
    <Resolution Name="ClassFieldsMustHaveInLineCommentsResolution">All class fields variables should have in-line comments. Class: {0}. Field: {1}. Namespace: {2}</Resolution>
    <Resolution Name="ClassMethodsMustHaveInLineCommentsResolution">All class methods variables should have in-line comments. Class: {0}. Method: {1}. Namespace: {2}</Resolution>
    <MessageLevel Certainty="100">Error</MessageLevel>
    <Email></Email>
    <FixCategories>Breaking</FixCategories>
    <Owner>BMFBovespa</Owner>
  </Rule>

  <Rule TypeName="BovespaDoNotDeclareMultipleLocalsAndFields" Category="BovespaDoNotDeclareMultipleLocalsAndFields" CheckId="BOV2503">
    <Name>Check BovespaDoNotDeclareMultipleLocalsAndFields</Name>
    <Description>Check BovespaDoNotDeclareMultipleLocalsAndFields</Description>
    <Url></Url>
    <Resolution Name="DoNotDeclareMultipleLocalsAndFieldsResolution">Declare each field or variable at each line. Class: {0}. Element: {1}. Namespace: {2}</Resolution>
    <MessageLevel Certainty="100">Error</MessageLevel>
    <Email></Email>
    <FixCategories>Breaking</FixCategories>
    <Owner>BMFBovespa</Owner>
  </Rule>

  <Rule TypeName="BovespaClassNameMustMatchFile" Category="BovespaClassNameMustMatchFile" CheckId="BOV2801">
    <Name>Check BovespaClassNameMustMatchFile</Name>
    <Description>Check BovespaClassNameMustMatchFile</Description>
    <Url></Url>
    <Resolution Name="ClassNameMustMatchFileResolution">The class name must match the ".cs" file: {0}</Resolution>
    <MessageLevel Certainty="100">Error</MessageLevel>
    <Email></Email>
    <FixCategories>Breaking</FixCategories>
    <Owner>BMFBovespa</Owner>
  </Rule>

  <Rule TypeName="BovespaFileMustHaveOnlyOnePublicType" Category="BovespaFileMustHaveOnlyOnePublicType" CheckId="BOV2802">
    <Name>Check BovespaFileMustHaveOnlyOnePublicType</Name>
    <Description>Check BovespaFileMustHaveOnlyOnePublicType</Description>
    <Url></Url>
    <Resolution Name="FileMustHaveOnlyOnePublicTypeResolution">Each file ".cs" have to be only one public class: {0}</Resolution>
    <MessageLevel Certainty="100">Error</MessageLevel>
    <Email></Email>
    <FixCategories>Breaking</FixCategories>
    <Owner>BMFBovespa</Owner>
  </Rule>
  
  <Rule TypeName="BovespaDoNotDeclareTooManyParameters" Category="BovespaDoNotDeclareTooManyParameters" CheckId="BOV2805">
    <Name>Check BovespaDoNotDeclareTooManyParameters</Name>
    <Description>Check BovespaDoNotDeclareTooManyParameters</Description>
    <Url></Url>
    <Resolution Name="DoNotDeclareTooManyParametersResolution">Do not declare more than 10 parameters. Class: {0}. Method: {1}. Namespace: {2}</Resolution>
    <MessageLevel Certainty="100">Error</MessageLevel>
    <Email></Email>
    <FixCategories>Breaking</FixCategories>
    <Owner>BMFBovespa</Owner>
  </Rule>

  <Rule TypeName="BovespaRegionRules" Category="BovespaMemberMustBeInsideRegion" CheckId="BOV2998">
    <Name>Check BovespaRegionRules</Name>
    <Description>Check BovespaRegionRules</Description>
    <Url></Url>
    <Resolution Name="MemberMustBeInsideRegionResolution">Group the members into regions. File: {0}</Resolution>
    <Resolution Name="RemoveNotUsedRegionsResolution">Empty regions (#region...endregion) are not allowed. File: {0}</Resolution>
    <MessageLevel Certainty="100">Error</MessageLevel>
    <Email></Email>
    <FixCategories>Breaking</FixCategories>
    <Owner>BMFBovespa</Owner>
  </Rule>

  <Rule TypeName="BovespaVariablesAtSameCodeBlockOneLine" Category="BovespaVariablesAtSameCodeBlockOneLine" CheckId="BOV2999">
    <Name>Check Bovespa Variables At Same Code Block One Line</Name>
    <Description>Check Bovespa Variables At Same Code Block One Line</Description>
    <Url></Url>
    <Resolution Name="BovespaVariablesAtSameCodeBlockOneLineResolution">Problems in variable declarations. Class: {0}. Element: {1}. Namespace: {2}. Variable: {3}</Resolution>
    <MessageLevel Certainty="100">Error</MessageLevel>
    <Email></Email>
    <FixCategories>Breaking</FixCategories>
    <Owner>BMFBovespa</Owner>
  </Rule>

</Rules>